﻿namespace WebApp.Models
{
    public class ProductBinding
    {
        // 没有ProductId属性，没有导航属性
        public string Name { get; set; }
        public decimal Price { get; set; }
        public long CategoryId { get; set; }
        public long SupplierId { get; set; }

        public Product ToProudct() => new Product { 
            Name = Name, 
            Price = Price, 
            CategoryId = CategoryId, 
            SupplierId = SupplierId
        };
    }
}
